package edu.scau.pos.vo;

import edu.scau.payment.domain.Payment;
import edu.scau.pos.domain.SaleLineItem;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class OrdersVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(name = "id", description = "自增编号", type = "Integer")
    private long id;

    @Schema(name = "orderId", description = "订单编号", type = "Integer")
    @NotBlank(message = "订单Id不能为空")
    private String orderId;

    @Schema(name = "amount", description = "订单金额", type = "String")
    private double amount;

    @Schema(name = "quantity", description = "商品数量",type = "int")
    private int quantity;

    @Schema(name = "discountAmount", description = "打折金额", type = "String")
    private double discountAmount;
    @Schema(name = "status", description = "订单状态", type = "Integer")
    private Integer status;
    @Schema(name = "createTime",description = "订单创建时间",type = "Date")
    private Date createTime;
    @Schema(name = "strategyId", description = "打折策略", type = "String")
    private String strategyId;
    @Schema(name = "saleLineItems", description = "商品详情",type = "Date")
    private List<SaleItemVo> saleLineItems;


//    @Schema(name = "strategyId", description = "打折策略", type = "String")
//    private StrategyOwn strategyOwn;


    public OrdersVo(long id, String orderId, double amount, int quantity, double discountAmount, Integer status, Date createTime, String strategyId, List<SaleItemVo> saleLineItems) {
        this.id = id;
        this.orderId = orderId;
        this.amount = amount;
        this.quantity = quantity;
        this.discountAmount = discountAmount;
        this.status = status;
        this.createTime = createTime;
        this.strategyId = strategyId;
        this.saleLineItems = saleLineItems;
    }

    public OrdersVo() {
    }
}
